/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*                                                                  *
*        *************************************************         *
*        *©2021-2031 HT  Corporation All rights reserved *         *
*        *************************************************         *
*                                                                  *
* FileName    : pthread_work.h                                     *
*                                                                  *
* Author      : linus                                              *
*                                                                  *
* Email       : luoyaojun@haitutech.com                            *
*                                                                  *
* Date        : 2023-2-13                                          *
*                                                                  *
* Description :                                                    *
*                                                                  *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */


#ifndef __HT_PTHREAD_WORK_H
#define __HT_PTHREAD_WORK_H

struct pthread_work
{

    const char *work_name;

    pthread_mutex_t mutex;

    pthread_t pthd;

    HT_PTHREAD_HANDLE hdl;

    HT_VOID *argv;

    //	ms
    HT_S32 timeout;

    struct pthread_work *next;

    HT_HANDLE pthread;

	HT_VOID *priv;

	/*
	**	work_mode
	**	0 run one time
	**	1 for (;;)
	*/
	HT_U32 work_mode;
};

#endif
